import Vue from 'vue'
import Router from 'vue-router'

Vue.use(Router)

export const constantRouterMap = [
    {
        path: '/',
        name: 'Home',
        component: () => import('@/views/home/index'),
        redirect: '/login',
        children: [{
            path: 'login',
            component: () => import('@/views/login/index')
        }]
    },
    {
        path: '/list',
        component: () => import('@/views/list/index'),
        name: 'List',
        meta: {title: '病案首页'}
    },
    {
        path: '/helper',
        component: () => import('@/views/helper/index'),
        name: 'Helper',
        meta: {title: '小助手'}
    },
    {
        path: '/score',
        component: () => import('@/views/score/index'),
        name: 'Score',
        meta: {title: '小助手'}
    }
]

export default new Router({
    mode: 'history',
    base: 'client',
    scrollBehavior: () => ({y: 0}),
    routes: constantRouterMap
})
